package baseClass;
/*
    语法错误
    2022-3-9-杨海南
 */
public class ErrorParse {
    private int line;
    private int indexInLine;
    private String errorMessage;
    //该语法错误对应的token的类型下标
    private int parseSymbolIndex;
    private int start;
    private int end;

    public ErrorParse(int line, int indexInLine, String errorMessage, int parseSymbolIndex, int start, int end) {
        this.line = line;
        this.indexInLine = indexInLine;
        this.errorMessage = errorMessage;
        this.parseSymbolIndex = parseSymbolIndex;
        this.start = start;
        this.end = end;
    }

    @Override
    public String toString() {
        return "ErrorParse{"+errorMessage+':'+parseSymbolIndex+'}';
    }

    public int getLine() {
        return line;
    }

    public int getIndexInLine() {
        return indexInLine;
    }

    public String getErrorMessage() {
        return errorMessage;
    }

    public int getParseSymbolIndex() {
        return parseSymbolIndex;
    }

    public int getStart() {
        return start;
    }

    public int getEnd() {
        return end;
    }
}
